xavier2119 Posted December 11, 2013 Share Posted December 11, 2013 As the title says I am trying to add a bleed mechanic (similar to ignite, just wont burn loot at drop) that will do damage over time ( a random value between 2-5 seconds) that will do (x) damage a tick. I have looked at Heavenfalls RPG mod and im not entirely sure on how to add it in even after all of that x.x I have a weapon that I want to attach the bleed to, so it won't have to go onto every weapon in the game, but I am stuck here and could really use some help with it if you can find the time for it. Thank you for your time!! -- Troubled modder Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/ Share on other sites More sharing options...
TheDanaAddams Posted December 11, 2013 Share Posted December 11, 2013 I'm kinda taking a shot in the dark, here... but I think you might be able to achieve this by creating two components.One that makes a character/monster bleedable, like the component that specifies whether they can catch fire...And one that makes a weapon/item trigger the bleed, like the one that causes flammable targets to ignite. Once you have those, your modmain would just need to be a bunch of prefab post-inits, to add those new components. Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-387671 Share on other sites More sharing options...
seronis Posted December 11, 2013 Share Posted December 11, 2013 I'm kinda taking a shot in the dark, here... For someone who repeatedly says she is not a coder you seem to keep giving very sound advice. =-) Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-387674 Share on other sites More sharing options...
xavier2119 Posted December 11, 2013 Author Share Posted December 11, 2013 Yea thats exactly what I was thinking, but I can't figure out exactly how to do that (just started modding like last week) and its really confusing for me as of yet to add something that isn't already in the game Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-387675 Share on other sites More sharing options...
NikMik Posted December 11, 2013 Share Posted December 11, 2013 I would say an "onattack" function using time events to cause a certain amount of damage at certain times. This isn't at all correct, but like this: [codesyntax]Timeevent stuff: 4Target: dodelta -damage Timevent stuff: 8Target:dodelta -damage timeevent stuff: 12Target: dodelta -damage[/codesyntax] Don't actually try copying that stuff in. I'll get back to this after dinner. Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-387682 Share on other sites More sharing options...
Malacath Posted December 11, 2013 Share Posted December 11, 2013 When you say 'similiar to ignite' you don't mean that you can go up to the creature and right click it to make it bleed, do you?If so then Danas solution is the way to go. Otherwise Mr. Tiddles idea sounds more promising. Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-387683 Share on other sites More sharing options...
NikMik Posted December 11, 2013 Share Posted December 11, 2013 (edited) When you say 'similiar to ignite' you don't mean that you can go up to the creature and right click it to make it bleed, do you?If so then Danas solution is the way to go. Otherwise Mr. Tiddles idea sounds more promising.Yeah, mine works perfectly. I'll get a quick video demonstration up. I'll also upload the scripts after the last few tweaks. Here's the video:http://www.youtube.com/watch?v=2CpH8SsfqFk&feature=youtu.be And the script: I chose the spider hit response because it's a failry plain "splatty" sound that works with almost any enemy... apart from the Chess enemies.local bleedchance = 0.8 local function onattack(inst, owner, target) if math.random() < bleedchance then owner:DoTaskInTime(2, function() target.components.health:DoDelta(-5) end) owner:DoTaskInTime(2, function() target.SoundEmitter:PlaySound("dontstarve/creatures/spider/hit_response") end) owner:DoTaskInTime(2, function() SpawnPrefab("splash").Transform:SetPosition(target:GetPosition():Get()) end) owner:DoTaskInTime(4, function() target.components.health:DoDelta(-5) end) owner:DoTaskInTime(4, function() target.SoundEmitter:PlaySound("dontstarve/creatures/spider/hit_response") end) owner:DoTaskInTime(4, function() SpawnPrefab("splash").Transform:SetPosition(target:GetPosition():Get()) end) owner:DoTaskInTime(6, function() target.components.health:DoDelta(-5) end) owner:DoTaskInTime(6, function() target.SoundEmitter:PlaySound("dontstarve/creatures/spider/hit_response") end) owner:DoTaskInTime(6, function() SpawnPrefab("splash").Transform:SetPosition(target:GetPosition():Get()) end) owner:DoTaskInTime(8, function() target.components.health:DoDelta(-5) end) owner:DoTaskInTime(8, function() target.SoundEmitter:PlaySound("dontstarve/creatures/spider/hit_response") end) owner:DoTaskInTime(8, function() SpawnPrefab("splash").Transform:SetPosition(target:GetPosition():Get()) end) endendThe "0.8" and "-5"s can be changed. The "-5"s are how much damage the enemy takes, the "0.8" is the chance to cause bleeding. Also, you can copy and paste the script and change the "DoTaskInTime" for the bleeding to last longer or be shorter. And don't forget to add: inst.components.weapon.onattack = onattack Edited December 11, 2013 by Mr. Tiddles Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-387684 Share on other sites More sharing options...
NikMik Posted December 11, 2013 Share Posted December 11, 2013 I think, while mine is simple and works pretty well, Dana's would be much more complicated and require more effort - but have more options and that sort of stuff. Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-387685 Share on other sites More sharing options...
xavier2119 Posted December 11, 2013 Author Share Posted December 11, 2013 Holy crap tiddles you are awesome. Now I jsut put this in the onattack function in weapon prefabs file right? like it will be trident.lua for that, also how did you get health bars on the bottom of the enemies, that is an awesome mod holy crap Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-387832 Share on other sites More sharing options...
NikMik Posted December 12, 2013 Share Posted December 12, 2013 (edited) Yeah, in the weapons prefab file. And don't forget the "inst.components.weapon.onattack = onattack"! And the mod is FutaraDragon's Dynamic Status Bar. http://forums.kleientertainment.com/files/file/271-futaradragon-dynamic-status-bar/ Edited December 12, 2013 by Mr. Tiddles Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-388043 Share on other sites More sharing options...
xavier2119 Posted December 12, 2013 Author Share Posted December 12, 2013 Yeah, in the weapons prefab file. And don't forget the "inst.components.weapon.onattack = onattack"! And the mod is FutaraDragon's Dynamic Status Bar. http://forums.kleientertainment.com/files/file/271-futaradragon-dynamic-status-bar/ Everything works great thank you so much!!! and ya that mod is sweet have to download that Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-388067 Share on other sites More sharing options...
NikMik Posted December 12, 2013 Share Posted December 12, 2013 Everything works great thank you so much!!! and ya that mod is sweet have to download that No problem! I didn't know exactly how to do that myself, so I also learnt something. Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-388081 Share on other sites More sharing options...
simplex Posted December 12, 2013 Share Posted December 12, 2013 I'm kinda taking a shot in the dark, here... but I think you might be able to achieve this by creating two components. One that makes a character/monster bleedable, like the component that specifies whether they can catch fire... And one that makes a weapon/item trigger the bleed, like the one that causes flammable targets to ignite. Once you have those, your modmain would just need to be a bunch of prefab post-inits, to add those new components. You should set aside some time to study programming, seriously. You have some pretty good instincts about it. But I think your method would be overkill for the present purposes. @Mr. Tiddles's solution is simpler for the problem at hand. Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-388156 Share on other sites More sharing options...
TheDanaAddams Posted December 12, 2013 Share Posted December 12, 2013 You should set aside some time to study programming, seriously. You have some pretty good instincts about it.But I think your method would be overkill for the present purposes. @Mr. Tiddles's solution is simpler for the problem at hand.I think I have good instincts about a lot of things... I guess I'm sort of intuitive, in that sense - if someone was trying to do something technical in a 3D animation, and couldn't figure it out, I'd usually have an idea that would set them on the right path.I'm just... clever.I mean... not trying to sound full of myself, or anything... but... I really should learn some programming in a serious context... there are just so many artistic things I want to learn about.Different animation packages... styles of art and animation... sculpting, painting, all that stuff.There's just too much I want to learn! ;A; Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-388161 Share on other sites More sharing options...
NikMik Posted December 12, 2013 Share Posted December 12, 2013 (edited) But do you have good instincts about wibbly wobbly, timey wimey stuff? And I don't care if that was terrible! Edited December 12, 2013 by Mr. Tiddles Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-388163 Share on other sites More sharing options...
TheDanaAddams Posted December 12, 2013 Share Posted December 12, 2013 But do you have good instincts about wibbly wobbly, timey wimey stuff? And I don't care if that was terrible!I thought that sentence started out pretty good... just... got away from you...;P Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-388168 Share on other sites More sharing options...
NikMik Posted December 12, 2013 Share Posted December 12, 2013 I thought that sentence started out pretty good... just... got away from you...;P I got no reply. I think my brain's given up for the day. Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-388170 Share on other sites More sharing options...
simplex Posted December 12, 2013 Share Posted December 12, 2013 I mean... not trying to sound full of myself, or anything... but... You got way too cocky after JoeW declared you immortal... Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-388184 Share on other sites More sharing options...
TheDanaAddams Posted December 12, 2013 Share Posted December 12, 2013 You got way too cocky after JoeW declared you immortal... I AM INDESTRUCTIBLE! I AM ALL-POWERFUL! COME AT ME, DEATH!! DO YOUR WORST!!Ow, not so rough, Death... please... be gentle... I'm fragile... Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-388218 Share on other sites More sharing options...
NikMik Posted December 21, 2013 Share Posted December 21, 2013 (edited) I've finished the new bleed appearance and tweaked some of the stats of the Trident for you. Base damage: 60 - a bit less than the Dark Sword but more than the hambat and Thulucite club. The bleeding deals 5 damage, occurs once every tick for 8 ticks (before you set it to deal 32 damage every 2 ticks for 4 ticks, which I thought seemed a bit too much damage in too little time). I'll include a version with.without the base stat changes so you can choose! Also: Here's a (still using free Fraps because I'm still too lazy to get it off my old computer) a video demonstrating the new, red blood, and the way it's faster. Fist, I see how long it takes to kill a tallbird, and then myself, and then my cat. It's pretty good at killing things without having to be near them! The "me" has 750 health, so it takes a while. http://www.youtube.com/watch?v=yW_WPk86fS4 Changed stats.zip Unchanged stats.zip Edited December 21, 2013 by Mr. Tiddles Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-392200 Share on other sites More sharing options...
xavier2119 Posted December 23, 2013 Author Share Posted December 23, 2013 I've finished the new bleed appearance and tweaked some of the stats of the Trident for you. Base damage: 60 - a bit less than the Dark Sword but more than the hambat and Thulucite club. The bleeding deals 5 damage, occurs once every tick for 8 ticks (before you set it to deal 32 damage every 2 ticks for 4 ticks, which I thought seemed a bit too much damage in too little time). I'll include a version with.without the base stat changes so you can choose! Also: Here's a (still using free Fraps because I'm still too lazy to get it off my old computer) a video demonstrating the new, red blood, and the way it's faster. Fist, I see how long it takes to kill a tallbird, and then myself, and then my cat. It's pretty good at killing things without having to be near them! The "me" has 750 health, so it takes a while. http://www.youtube.com/watch?v=yW_WPk86fS4 Changed stats.zip Unchanged stats.zip Thank you so much Tid!!!!!! :333333 Link to comment https://forums.kleientertainment.com/forums/topic/30329-mod-idea-bleed-mechanic/#findComment-393239 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now